import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Home from '@/components/Home'
import Login from '@/components/Login'
import NavMenu from '@/components/NavMenu'
import Tab1 from '@/components/tab1'
import demo from '@/components/demo'


Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children:[
        {
          path: 'tab1',
          name: 'Tab1',
          component: Tab1
        },
        {
          path: '/login',
          name: 'Login',
          component: Login
        }
      ]
    },
    {
      path: '/demo',
      name: 'demo',
      component: demo
    }

  ]
})
